import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
import systemSet from "./systemSet";
import content from "./content"

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('@/views/layout/Layout'),
      meta: {title: '工作台'},
      redirect: '/home',
      children:[
        {
          path: '/home',
          component: () => import('@/views/home/ControlBoard'),
          meta: {
            module: '控制台', title: '信息中心'
          }
        },
        systemSet.configSetting,
        systemSet.menuList,
        systemSet.merchantList,
        systemSet.roleList,
        systemSet.sysUserList,

        content.articleList
      ]
    },
    {
      path: '/login',
      name: 'login',
      meta: {title: '登录页'},
      component: ()=> import('@/views/user/Login')
    },
    {
      path: '*',
      component: ()=> import('@/components/error/404')
    }
  ],
})
